package operation;

import book.Book;
import book.BookList;

public class ShowOperation implements IOperation{
    @Override
    public void work(BookList booklist) {
        System.out.println("显示图书...");
        System.out.println("已有图书信息如下:");
        int i = 0;
        int currentSize = booklist.getUsedSize();
        for (i = 0; i < currentSize; i++) {
            Book book = booklist.findBook(i);
            System.out.println(book);
        }
        System.out.println("--------------------------------------");
    }
}
